Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generalize "pinned" to "discount" for cases where contract is in memory #1799

Merged
merged 2 commits into from
Feb 1, 2024

Conversation

webmaster128
Copy link
Member

Creating the concept of discounted setup cost is motivated by #1798 but this PR can be reviewed and merged independent of #1798.

What this is changing here is:

  • Avoid confusing usage of the term "pinned" for replies
  • Charge 2000 gas instead of 0 for instantiations from an in-memory cache (consensus breaking)

@webmaster128 webmaster128 requested a review from pinosu January 26, 2024 16:20
Copy link

codecov bot commented Feb 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (796907e) 55.00% compared to head (3206540) 55.01%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1799   +/-   ##
=======================================
  Coverage   55.00%   55.01%           
=======================================
  Files          64       64           
  Lines        9661     9663    +2     
=======================================
+ Hits         5314     5316    +2     
  Misses       3821     3821           
  Partials      526      526           
Files Coverage Δ
x/wasm/types/gas_register.go 97.53% <100.00%> (+0.06%) ⬆️

Copy link
Contributor

@pinosu pinosu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! LGTM 👍

@webmaster128 webmaster128 merged commit 5f444cd into main Feb 1, 2024
16 checks passed
@webmaster128 webmaster128 deleted the setup-discounts branch February 1, 2024 13:14
@webmaster128
Copy link
Member Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants